package com.bw.skill.adapter;

import android.content.Intent;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;

import com.bw.mvvm_common.BaseApplication;
import com.bw.mvvm_common.filed.UIField;
import com.bw.mvvm_common.network.load.LoadImage;
import com.bw.skill.R;
import com.bw.skill.entity.SecKillEntity;
import com.bw.skill.mvvm.view.SkillDetailActivity;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;

import org.jetbrains.annotations.NotNull;

import java.util.HashMap;

/**
 * @author KK
 * @description:
 * @date :2021/10/27 9:10
 */
public class SeckillAdapter extends BaseQuickAdapter<SecKillEntity.DataBean, BaseViewHolder> {
    public SeckillAdapter() {
        super(R.layout.item_skill_list);
        addChildClickViewIds(R.id.skill_buy,R.id.item_skill_tv,R.id.item_skill_title);
    }

    @Override
    protected void convert(@NotNull BaseViewHolder baseViewHolder, SecKillEntity.DataBean dataBean) {
        baseViewHolder.setText(R.id.item_skill_title,dataBean.getGoods_desc());
        baseViewHolder.setText(R.id.item_skill_tv,dataBean.getGoods_default_sku());
        baseViewHolder.setText(R.id.item_skill_price,dataBean.getGoods_default_price());

        ImageView imageView = baseViewHolder.findView(R.id.item_skill_im);
        LoadImage.loadMatchImg(dataBean.getGoods_default_icon(),imageView);


    }
}
